package com.zhao.dota.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.zhao.dota.common.contant.BaseEnum;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class Round implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer leagueId;

    private Integer num;

    private Type type;

    private LocalDateTime startTime;

    private State state;

    private LocalDateTime endTime;

    private Integer createUserId;

    public enum Type implements BaseEnum {

        SECRET_AUCTION("暗拍"),

        TRADE("自由交易")

        ;

        private final String desc;

        Type(String desc) {
            this.desc = desc;
        }

        @Override
        public String getDesc() {
            return desc;
        }
    }

    public enum State implements BaseEnum {

        CREATED("创建"),

        RUNNING("进行中"),

        SETTLING("结算中"),

        ROLL("roll点"),

        FINISHED("完成")
        ;

        private final String desc;

        State(String desc) {
            this.desc = desc;
        }

        @Override
        public String getDesc() {
            return this.desc;
        }
    }

}
